#include "processBar.h"
#include <unistd.h>
#include <stdio.h>
#include <cstring>

void download()
{
    int total = 1000; //1000mb
    int cur = 0;

    while(cur <= total)
    {
        usleep(50000);
        int rate = cur * 100 / total;
        processbar(rate);

        cur += 10;
    }
    
    Bar_distory();
    printf("\n");
}

int main()
{
    //processbar();
    download();
    download();
    download();
    return 0;
}
